<%@page import="com.printeverywhere.dto.BannerCampaigns"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>

<s:form method="post" action="enableCampaigns.htm" namespace="/admin" theme="simple">
	<table width="100%" align="center">
		<tr>
			<td height="40" class="sectionheading bottom-border">Enable Pending Campaigns</td>
		</tr>
		<tr>
			<td>
				<s:actionerror cssClass="Note-red" />
				<s:actionmessage cssClass="verdana11greynormal" />
		</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>
				<display:table name="banners" pagesize="${pageSize}" cellpadding="0" cellspacing="0" requestURI="showPendingAccounts.htm" id="row" class="verdana12blacknormal">
				<display:column headerClass="Table-Head" title="User" property="user.userId" />
				<display:column headerClass="Table-Head" title="Start date" property="startDate" />
				<display:column headerClass="Table-Head" title="Categories" >
					<s:iterator value="#attr.row.categories" status="row">
						<s:property />
					</s:iterator>
				</display:column>
				<display:column headerClass="Table-Head" title="Banner Type" property="bannerSettings.formatName" />
				<display:column headerClass="Table-Head" title="Campaign Type" value="Views" />
				<display:column headerClass="Table-Head" title="Purchased" value="1000" />
				<display:column headerClass="Table-Head" title="No. of previous rejections" value="800" />
				<display:column headerClass="Table-Head" title="Action">
					<table>
						<tr>
							<td id="mddm" valign="top" rowspan="2" class="verdana12blacknormal">
								<a class="navi-link" href="#" onmouseover="mopen('<%= row_rowNum %>', this, 'navi-link', 'right', <%= row_rowNum %>)" onmouseout="mclosetime()">Select</a>
								<div style="visibility: hidden;" id="<%= row_rowNum %>" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
									<a href="approveCampaigns.htm?id=<%= ((BannerCampaigns) row).getId() %>">Accept</a>
									<a href="rejectCampaigns.htm?id=<%= ((BannerCampaigns) row).getId() %>">Reject</a>
									<a href="javascript: wantToDeleteWithURL('deleteCampaigns.htm?id=<%= ((BannerCampaigns) row).getId() %>&pageSize=${pageSize}','Do you want to delete this Campaign?')">Delete</a>
									<a href="mailto: <%= ((BannerCampaigns) row).getUser().getEmail() %>">Contact</a>
								</div>
							</td>
						</tr>
					</table>
				</display:column>
				<display:column>
					<tr>
						<td colspan="12" class="" bgcolor="<%= row_rowNum % 2 == 0 ? "#F8F8F8" : "" %>">
							<s:if test="#attr.row.image != null && #attr.row.image !=''">
								<img src="../servlet/ImageServlet?dto=BannerCampaigns&id=<s:property value="#attr.row.id"/>" alt="alttext" width="200" height="60" border="0" style="margin: 5px 0px 0px 5px">
							</s:if>
							<s:else><img src="<%= request.getContextPath() %>/images/no_image.gif" alt="No Image" height="45" width="45"/></s:else>
						</td>
					</tr>
				</display:column>
			</display:table>

			</td>
		</tr>
		<tr>
			<td>
				<table>
					<tr>
						<td class="verdana12blacknormal">
							Campaigns per page
						</td>
						<td>
							<s:select cssClass="textfiled-border"
								list="#{'0':'10','1':'20','2':'50','3':'100'}" theme="simple"></s:select>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</s:form>